<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Task extends Model
{

    protected $fillable = ['orderTaskId', 'workId', 'workerId', 'date', 'goodsName','goodsId', 'output', 'finish', 'notes'];



    public function ordertask(){
        return $this->belongsTo('App\Ordertask', 'orderTaskId');
    }
    public function work(){
        return $this->belongsTo('App\Work', 'workId');
    }
    public function finishs()
    {
        return $this->hasMany('App\Finish', 'taskId');
    }
}
